#include "command.hpp"


int main()
{
    Log log;

    //int s = getshm();
    int s = GetShm();
    char* shmadder = (char*)shmat(s, nullptr, 0);

    int fd = open(FIFO_FILE, O_WRONLY);
    if (fd < 0)
    {
        log(_ERROR_, "error from fd open--processa.cpp, error code:%d", errno);
        exit(1);
    }

    while (true)
    {
        std::cout << "please enter# ";  fgets(shmadder, size, stdin);

        write(fd, "c", 1);
    }
    shmdt(shmadder);
    close(fd);

    return 0;
}

